Passed
Push — develop ( b91919...1ff2d0 )
by Endre
05:15
created

MenuOpenStateAdapter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A onChange 0 3 1
1
import {IObserverAdapter} from '@enbock/state-value-observer/Observer';
2
3
export default class MenuOpenStateAdapter implements IObserverAdapter<boolean> {
4
  private currentState: boolean;
5
6
  constructor() {
7 2
    this.currentState = false;
8
  }
9
10
  onChange(newValue: boolean): void {
11 1
    this.currentState = newValue;
12
  }
13
}
14